<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('index')}">{:lang('ADMIN_VALIDE_INDEX')}</a></li>
			<li class="active"><a href="{:url('add')}">{:lang('ADMIN_VALIDE_ADD')}</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" id="myform"  action="{:url('addPost')}">
			<div class="form-group">
				<label  class="col-sm-2 control-label"><span class="form-required">*</span>关键字</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" required  name="key_c">
				</div>
			</div>
			<div class="form-group">
				<label  class="col-sm-2 control-label"><span class="form-required">*</span>配置名</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" required name="name_c">
				</div>
			</div>
            <div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>类型</label>
				<div class="col-md-6 col-sm-10">
					<label class="radio-inline">
						<input type="radio" name="type" value="integer" checked > integer
					</label>
					<label class="radio-inline">
						<input type="radio" name="type" value="float">float 
					</label>
                    <label class="radio-inline">
						<input type="radio" name="type" value="string">string 
					</label>
                    <label class="radio-inline">
						<input type="radio" name="type" value="boolean">boolean 
					</label>
                    <label class="radio-inline">
						<input type="radio" name="type" value="array">array 
					</label>
				</div>
			</div>
            <div class="form-group">
                <label class="col-sm-2 control-label">规则</label>
                <div class="col-md-6 col-sm-10">
                    <label class="checkbox-inline">
                        <input type="checkbox" value="1" checked id="required"/>必填
                    </label>
                    <br/> 
                    <label class="radio-inline">
                        <input type="radio"  name="way" data-checked="0" value="1"/>范围
                    </label>
                    <input type="number" name="min" class="form-control" style="width:100px;display:inline-block;margin-left: 20px;" value=""/>--<input type="number" name="max" class="form-control" style="width:100px;display:inline-block" value=""/>
                    <br/>
                     <label class="radio-inline">
                        <input type="radio"  name="way" data-checked="0" value="2" />集合
                    </label>
                    <input type="text"  name="set" class="form-control" onkeyup="javascript:this.value=this.value.replace(/，/ig,',');" style="display:inline-block;margin-left: 20px;width:300px;margin-top: 10px" />用逗号分隔
				</div>
            </div>
            <div class="form-group">
				<label  class="col-sm-2 control-label">组ID</label>
				<div class="col-md-6 col-sm-10">
					<input type="number" class="form-control"   name="special">
				</div>
			</div>
            <div class="form-group">
				<label  class="col-sm-2 control-label">默认值</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" name="value_c">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"><span class="form-required">*</span>描述</label>
				<div class="col-md-6 col-sm-10">
					<textarea class="form-control" name="descr" required id="descr" ></textarea>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<button type="submit" onclick="return formValidate()" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
				</div>
			</div>
		</form>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
    <script src="__STATIC__/js/game.js"></script>
</body>
</html>